<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>开心买首页</title>
		<link rel="icon" href="${project_name}/image/logo.png" >
		<script src="${project_name}/js/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
		<script src="${project_name}/js/index.js"></script>
	</head>
	<script>
		$(function () {
			$.ajax({
				url: '${project_name}/front_news/show',
				type: 'post',    // 请求方式
				async: true,    // 默认true 异步请求 同步为false
				data: "",
				success: function (data) {
					JSON.stringify(data);
					var list = data.json1;
					var str=''
					for (var i = 0; i < list.length; i++) {
						str+='<li>\n' +
								'<div style="text-align: center"><a href="${project_name}/front_news/find/'+list[i].id+'">'+list[i].title+'</a></div></li>'
						$('#news').html(str)
					}
				}
			},"json")
			$.ajax({
				url: '${project_name}/product/find',
				type: 'post',    // 请求方式
				async: true,    // 默认true 异步请求 同步为false
				data: "",
				success: function (list) {
					console.log(list)
					var str=''
					for (var i = 0; i < list.length; i++) {
						str+='<li>\n' +
								'\t\t\t\t<a href="${project_name}/product/search?id='+list[i].id+'" target="_blank" class="a_con_list">\n' +
								'\t\t\t\t\t<p class="p_img"><img src="${project_name}/image/'+list[i].image+'"/></p>\n' +
								'\t\t\t\t</a>\n' +
								'\t\t\t\t<p class="p_title">\n' +
								'\t\t\t\t\t<span>【7.5折】</span>'+list[i].name+'\n' +
								'\t\t\t\t</p>\n' +
								'\t\t\t\t<p class="p_p">\n' +
								'\t\t\t\t\t<span class="price1">￥<span>'+list[i].price+'</span></span>\n' +
								'\t\t\t\t\t<span class="price2"><del>￥'+list[i].price+'</del></span>\n' +
								'\t\t\t\t\t<a href="${project_name}/product/add_to_cart?productId='+list[i].id+'&amount=1" target="_blank" class="gwc"></a>\n' +
								'\t\t\t\t</p>\n' +
								'\t\t\t</li>'

						$('.day_goods').html(str)
					}
				}
			})
			getTypeInfo("${project_name}")
		})
	</script>
	<body>
		<jsp:include page="public_header.jsp"/>

	    <!--头部end-->
	    <!--轮播区域-->
	    <div class="full_big_eye">
	        <!--菜单-->
	    	<div class="index_type">
	    		<ul class="index_type_ul" id="type_menu">

	    		</ul>
	    	</div>
	        <!--菜单-->
	        <!--轮播图-->
	        <div class="full_eye">
	        	<div id="inBaner">
	        		<ul class="big_eye_pic">
	        			<li style="display: block;">
	        				<a href="" class="img_box">
	        					<img src="./image/web-101-101-1.jpg"/>
	        				</a>
	        			</li>
	        			<li>
	        				<a href="" class="tpl">
	        					<img src="./image/web-101-101-2.jpg"/>
	        				</a>
	        			</li>
	        			<li>
	        				<a href="" class="tpl">
	        					<img src="./image/web-101-101-3.jpg"/>
	        				</a>
	        			</li>
	        			<li>
	        				<a href="" class="tpl">
	        					<img src="./image/web-101-101-4.jpg"/>
	        				</a>
	        			</li>
	        			<li>
	        				<a href="" class="tpl">
	        					<img src="./image/web-101-101-5.jpg"/>
	        				</a>
	        			</li>
	        		</ul>
	        		<div class="btn">
	        		    <ul>
	        		    	<li class="cur"></li>
	        		    	<li></li>
	        		    	<li></li>
	        		    	<li></li>
	        		    	<li></li>
	        		    </ul>
	        		</div>
	        	</div>
	        </div>
	        <!--轮播图-->
	    </div>
	    <!--轮播区域-->
	    <!--商品区-->
	    <div class="w1200">
	        <div class="qinha_box">
	        	<div class="qinha_title">
	        		<div class="v_h2">
	        			<p class="h2_top">限时抢购</p>
	        			<p class="h2_bottom">天天特价 早10点强势上新 </p>
	        		</div>
	        	</div>
	        	<div class="qinha_cons">
	        	    <ul class="qinha_ul" id="news">

	        	    </ul>
	        	</div>
	        </div>
	        <!--第四区-->
	        <div class="day_box">
	        	<div class="qinha_title">
	        		<div class="v_h2">
	        			<p class="h2_top">全场低价商品</p>
                        <p class="h2_bottom">精致好物 更快乐的生活</p>
	        		</div>
	        	</div>
	        	<ul class="day_goods">

	        	</ul>
	        </div>
	        <!--第四区-->
	    </div>
	    <!--商品区-->
	    <!--下拉搜索-->
	    <div id="nav" class="search_fixed">
	    	<div class="w1200">
	    		<div class="s_fixed_l"><img src="./image/search_logo.png"/></div>
	    		<div class="s_fixed_r">
	    			<form  method="post" action="${projectName}/product/like">
                        <input  placeholder="lumi 胶原蛋白" autocomplete="off" class="txt_f_sb" name="keyword" type="text">
                        <input value="搜索" class="f_btn_search" style="cursor:pointer" type="button">
	    			</form>
	    		</div>
	    	</div>
	    </div>
	    <!--下拉搜索end-->
	    <!--底部公用-->
	    <div class="footer">
	    	<div class="footer_b w1200"><img src="./image/foot_img1.jpg"/></div>
	    	<div class="footer_help w1200">
	    		<div class="footer1_l">
	    			<dl class="helpDl">
	    				<dt><h5>使用帮助</h5></dt>
	    				<dd><a href="">税费收取规则 </a></dd>
	    				<dd><a href="">新手指南 </a></dd>
	    			    <dd><a href="">常见问题 </a></dd>
	    				<dd><a href="">用户协议 </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>会员服务</h5></dt>
	    				<dd><a href="">积分政策  </a></dd>
	    				<dd><a href="">会员权益  </a></dd>
	    			    <dd><a href="">会员等级  </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>支付方式</h5></dt>
	    				<dd><a href="">积分支付  </a></dd>
	    				<dd><a href="">货到付款  </a></dd>
	    			    <dd><a href="">在线支付  </a></dd>
	    				<dd><a href="">优惠券支付  </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>配送方式</h5></dt>
	    				<dd><a href="">包邮政策   </a></dd>
	    				<dd><a href="">费用说明   </a></dd>
	    			    <dd><a href="">配送说明   </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>售后服务</h5></dt>
	    				<dd><a href="">电子发票   </a></dd>
	    				<dd><a href="">售后咨询   </a></dd>
	    			    <dd><a href="">退货办理   </a></dd>
	    				<dd><a href="">退货政策   </a></dd>
	    			</dl>
	    		</div>
	    		<div class="footer1_r">
	    			<ul>
	    				<li>
	    					<h2>手机开心买</h2>
	    					<img src="./image/footer_ewm_01.png"/>
	    					<p>下载移动客户端</p>
	    				</li>
	    				<li>
	    					<h2>开心买微信</h2>
	    					<img src="./image/footer_ewm_02.png"/>
                            <p>开心买官方微信</p>
	    				</li>
	    			</ul>
	    		</div>
	    	</div>
	        <div class="footer_nav">
	        	<div class="w720">
	        		<ul>
	        			<li>
	        				<a href="">关于开心买 </a>
	        				<span class="line"></span>
	        			</li>
	        			<li>
	        				<a href="">投资者关系 </a>
	        				<span class="line"></span>
	        			</li>
	        			<li>
	        				<a href="">商家入驻  </a>
	        				<span class="line"></span>
	        			</li>
	        			<li>
	        				<a href="">联系我们 </a>
	        				<span class="line"></span>
	        			</li>
	        		</ul>
	        	</div>
	        </div>
	        <div class="footer_bottom">
	        	<div class="w1200">
	        		<p>
	        			<span class="font_arial">Copyright© 2006-2016 happigo. All Rights Reserved </span>
                                           免费服务热线: 400-705-1111 | 固话也可拨打: 800-705-1111
                        <span class="font_arial">E-Mail: service@happigo.com</span><br>
                                           湘ICP备12000157号 信息网络传播视听节目许可证号：1810530
	        		</p>
	        		<p class="footer_b">
	        			<a href="http://www.itrust.org.cn/home/index/itrust_certifi/wm/2782875193.jsp">
	        				<img src="./image/foot_img3.png"/>
	        			</a>
	        			<a href="https://search.szfw.org/cert/l/CX20150428007576007720">
	        				<img src="image/foot_img4.png"/>
	        			</a>
	        		</p>
	        	</div>
	        </div>
	    </div>
	    <!--底部end-->
	</body>
</html>
